<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Trail - {% block title %}{% endblock %}</title>
        <link rel="shortcut icon" href="/images/favicon.png" />
        {% block head_link %}{% endblock %}
        <!-- Bootstrap -->
        <link href="{{ STATIC_URL }}css/bootstrap.min.css" rel="stylesheet">
        {% block styles %}{% endblock %}
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
        {% block scripts %}{% endblock %}
    </head>
    <body>
        <header class="navbar navbar-static-top  navbar-default" id="top" role="banner">
          <div class="container">
            <nav class="collapse  navbar-collapse bs-navbar-collapse" role="navigation">
              <ul class="nav navbar-nav">
                <li>
                  <a href="{% url "index" %}">首页</a>
                </li>
                <li>
                  <a href="{% url "home" %}">个人中心</a>
                </li>
                <li>
                  <a href="">联系</a>
                </li>
              </ul>
              <ul class="nav navbar-nav navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                      账号 <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                      {% if user.is_authenticated %}
                        <li><a href="{% url "signout" %}">登出</a></li>
                      {% else %}
                        <li><a href="{% url "signin" %}">登入</a></li>
                        <li><a href="{% url "signup" %}">注册</a></li>
                      {% endif %}
                      <li class="divider"></li>
                      <li><a href="#">设置</a></li>
                    </ul>
                  </li>
              </ul>
            </nav>
          </div>
        </header>
        <div class="container">
            {% if messages %}
                {% for message in messages %}
                <div class="alert alert-{{ message.tags }} alert-dismissible" role="alert">
                  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <strong>{{ message }}</strong>
                </div>
                {% endfor %}
            {% endif %}
            {% block doublemain %}{% endblock %}
            {% block sinlgemain %}{% endblock %}
        </div>
        <footer role="contentinfo">
          <div class="container">
            <div>
                <p>Design By <a href="#">rsj217</a></p>
                <p>Code licensed under <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a></p>
            </div>
          </div>
        </footer>
    </body>
</html>